Skip to content

Conversation

rasamassen
Copy link

@rasamassen rasamassen commented Sep 1, 2025

registerFont() registered fonts and colors from sections, but not from subparts of sections, such as textruns.

Description

Now the header registers every font and color in a textRun. This is important if the fonts and colors are actually going to be used.

Fixes # (issue)

Checklist:

  • My CI is 🟢
  • I have covered by unit tests my new code (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
  • I have updated the changelog

registerFont() registered fonts and colors from sections, but not from subparts of sections, such as textruns.
@coveralls
Copy link

coveralls commented Sep 1, 2025

Coverage Status

coverage: 96.758% (+0.001%) from 96.757%
when pulling dd9111c on rasamassen:Header-w-textRun
into 0ab0b49 on PHPOffice:master.

@rasamassen rasamassen changed the title RTF: Fix Header.php registerFont() RTF: Fix Header.php registerFont() not registering fonts/colors in subElements (such as textRuns) Sep 1, 2025
@rasamassen
Copy link
Author

I don't understand why this is failing the Static Analysis. I'm not sure what codebase you're using for that, but it sounds a lot like the issue described here: phpstan/phpstan#4579. I don't think this should be failing Static Analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants